<template>
  <div>{{ count }}</div>
  <hr />
  <Son @add="addClick"></Son>
</template>

<script>
import Son from './son.vue'
export default {
  name: 'HelloWorld',
  components: { Son },
  data() {
    return {
      count: 0,
    }
  },
  methods: {
    addClick(num) {
      this.count += num
    },
  },
}
</script>
<style scoped></style>
